<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="user" styleClass="edit">

        <rich:panel>
            <f:facet name="header">#{userHome.managed ? 'Edit' : 'Add'} User</f:facet>



            <s:decorate id="loginField" template="layout/edit.xhtml">
                <ui:define name="label">Login</ui:define>
                <h:inputText id="login"
                       required="true"
                           size="45"
                      maxlength="45"
                          value="#{userHome.instance.login}">
                    <a:support event="onblur" reRender="loginField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="passwordField" template="layout/edit.xhtml">
                <ui:define name="label">Password</ui:define>
                <h:inputText id="password"
                       required="true"
                           size="45"
                      maxlength="45"
                          value="#{userHome.instance.password}">
                    <a:support event="onblur" reRender="passwordField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="nameField" template="layout/edit.xhtml">
                <ui:define name="label">Name</ui:define>
                <h:inputText id="name"
                       required="true"
                           size="45"
                      maxlength="45"
                          value="#{userHome.instance.name}">
                    <a:support event="onblur" reRender="nameField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="surnameField" template="layout/edit.xhtml">
                <ui:define name="label">Surname</ui:define>
                <h:inputText id="surname"
                       required="true"
                           size="45"
                      maxlength="45"
                          value="#{userHome.instance.surname}">
                    <a:support event="onblur" reRender="surnameField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="birthDateField" template="layout/edit.xhtml">
                <ui:define name="label">Birth date</ui:define>
                <rich:calendar id="birthDate"
                       required="true"
                          value="#{userHome.instance.birthDate}" datePattern="MM/dd/yyyy" />
            </s:decorate>


            <s:decorate id="createDateField" template="layout/edit.xhtml">
                <ui:define name="label">Create date</ui:define>
                <rich:calendar id="createDate"
                       required="true"
                          value="#{userHome.instance.createDate}" datePattern="MM/dd/yyyy hh:mm a"/>
            </s:decorate>


            <s:decorate id="modifyDateField" template="layout/edit.xhtml">
                <ui:define name="label">Modify date</ui:define>
                <rich:calendar id="modifyDate"
                          value="#{userHome.instance.modifyDate}" datePattern="MM/dd/yyyy hh:mm a"/>
            </s:decorate>


            <s:decorate id="deleteDateField" template="layout/edit.xhtml">
                <ui:define name="label">Delete date</ui:define>
                <rich:calendar id="deleteDate"
                          value="#{userHome.instance.deleteDate}" datePattern="MM/dd/yyyy hh:mm a"/>
            </s:decorate>


            <s:decorate id="typeField" template="layout/edit.xhtml">
                <ui:define name="label">Type</ui:define>
                <h:inputText id="type"
                       required="true"
                           size="10"
                      maxlength="10"
                          value="#{userHome.instance.type}">
                    <a:support event="onblur" reRender="typeField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="calculatedRateField" template="layout/edit.xhtml">
                <ui:define name="label">Calculated rate</ui:define>
                <h:inputText id="calculatedRate"
                       required="true"
                          value="#{userHome.instance.calculatedRate}">
                    <a:support event="onblur" reRender="calculatedRateField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>


            <s:decorate id="enabledField" template="layout/edit.xhtml">
                <ui:define name="label">Enabled</ui:define>
                <h:selectBooleanCheckbox id="enabled"
                                   required="true"
                                      value="#{userHome.instance.enabled}"/>
            </s:decorate>











            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{userHome.persist}"
                       disabled="#{!userHome.wired}"
                       rendered="#{!userHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{userHome.update}"
                       rendered="#{userHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{userHome.remove}"
                      immediate="true"
                       rendered="#{userHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/User.xhtml"
                rendered="#{userHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml"
                rendered="#{!userHome.managed}"/>

        </div>
    </h:form>

<rich:tabPanel switchType="ajax">

    <rich:tab label="Commentonsuggestions">
        <h:form styleClass="association" id="commentonsuggestionsChildren">

            <h:outputText value="There are no commentonsuggestions associated with this user."
                       rendered="#{empty userHome.commentonsuggestions}"/>

            <rich:dataTable value="#{userHome.commentonsuggestions}"
                           var="_commentonsuggestion"
                      rendered="#{not empty userHome.commentonsuggestions}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="commentonsuggestionsTable">
                <rich:column sortBy="#{_commentonsuggestion.idCommentOnSuggestion}">
                    <f:facet name="header">Id comment on suggestion</f:facet>
                    <h:outputText value="#{_commentonsuggestion.idCommentOnSuggestion}"/>
                </rich:column>
                <rich:column sortBy="#{_commentonsuggestion.msg}">
                    <f:facet name="header">Msg</f:facet>
                    <h:outputText value="#{_commentonsuggestion.msg}"/>
                </rich:column>
                <rich:column sortBy="#{_commentonsuggestion.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_commentonsuggestion.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="commentonsuggestions">
        <div class="actionButtons">
            <s:button id="addcommentonsuggestion"
                   value="Add commentonsuggestion"
                    view="/CommentonsuggestionEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="commentonsuggestionFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Seats">
        <h:form styleClass="association" id="seatsChildren">

            <h:outputText value="There are no seats associated with this user."
                       rendered="#{empty userHome.seats}"/>

            <rich:dataTable value="#{userHome.seats}"
                           var="_seat"
                      rendered="#{not empty userHome.seats}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="seatsTable">
                <rich:column sortBy="#{_seat.idSeat}">
                    <f:facet name="header">Id seat</f:facet>
                    <h:outputText value="#{_seat.idSeat}"/>
                </rich:column>
                <rich:column sortBy="#{_seat.seatNumber}">
                    <f:facet name="header">Seat number</f:facet>
                    <h:outputText value="#{_seat.seatNumber}"/>
                </rich:column>
                <rich:column sortBy="#{_seat.state}">
                    <f:facet name="header">State</f:facet>
                    <h:outputText value="#{_seat.state}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="seats">
        <div class="actionButtons">
            <s:button id="addseat"
                   value="Add seat"
                    view="/SeatEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="seatFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Requests">
        <h:form styleClass="association" id="requestsChildren">

            <h:outputText value="There are no requests associated with this user."
                       rendered="#{empty userHome.requests}"/>

            <rich:dataTable value="#{userHome.requests}"
                           var="_request"
                      rendered="#{not empty userHome.requests}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="requestsTable">
                <rich:column sortBy="#{_request.idRequest}">
                    <f:facet name="header">Id request</f:facet>
                    <h:outputText value="#{_request.idRequest}"/>
                </rich:column>
                <rich:column sortBy="#{_request.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_request.name}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_request.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_request.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_request.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_request.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_request.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_request.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_request.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_request.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_request.singleDay}"/>
                </rich:column>
                <rich:column sortBy="#{_request.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_request.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_request.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_request.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_request.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_request.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_request.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_request.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_request.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_request.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_request.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_request.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_request.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="requests">
        <div class="actionButtons">
            <s:button id="addrequest"
                   value="Add request"
                    view="/RequestEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="requestFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Dialogs">
        <h:form styleClass="association" id="dialogsChildren">

            <h:outputText value="There are no dialogs associated with this user."
                       rendered="#{empty userHome.dialogs}"/>

            <rich:dataTable value="#{userHome.dialogs}"
                           var="_dialog"
                      rendered="#{not empty userHome.dialogs}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="dialogsTable">
                <rich:column sortBy="#{_dialog.idDialog}">
                    <f:facet name="header">Id dialog</f:facet>
                    <h:outputText value="#{_dialog.idDialog}"/>
                </rich:column>
                <rich:column sortBy="#{_dialog.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_dialog.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_dialog.updateDate}">
                    <f:facet name="header">Update date</f:facet>
                    <h:outputText value="#{_dialog.updateDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_dialog.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_dialog.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_dialog.lastCommentDate}">
                    <f:facet name="header">Last comment date</f:facet>
                    <h:outputText value="#{_dialog.lastCommentDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_dialog.ownerSeenDate}">
                    <f:facet name="header">Owner seen date</f:facet>
                    <h:outputText value="#{_dialog.ownerSeenDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_dialog.otherSeenDate}">
                    <f:facet name="header">Other seen date</f:facet>
                    <h:outputText value="#{_dialog.otherSeenDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="dialogs">
        <div class="actionButtons">
            <s:button id="adddialog"
                   value="Add dialog"
                    view="/DialogEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="dialogFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Evaluations">
        <h:form styleClass="association" id="evaluationsChildren">

            <h:outputText value="There are no evaluations associated with this user."
                       rendered="#{empty userHome.evaluations}"/>

            <rich:dataTable value="#{userHome.evaluations}"
                           var="_evaluation"
                      rendered="#{not empty userHome.evaluations}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="evaluationsTable">
                <rich:column sortBy="#{_evaluation.idEvaluation}">
                    <f:facet name="header">Id evaluation</f:facet>
                    <h:outputText value="#{_evaluation.idEvaluation}"/>
                </rich:column>
                <rich:column sortBy="#{_evaluation.marks}">
                    <f:facet name="header">Marks</f:facet>
                    <h:outputText value="#{_evaluation.marks}"/>
                </rich:column>
                <rich:column sortBy="#{_evaluation.evalDate}">
                    <f:facet name="header">Eval date</f:facet>
                    <h:outputText value="#{_evaluation.evalDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="evaluations">
        <div class="actionButtons">
            <s:button id="addevaluation"
                   value="Add evaluation"
                    view="/EvaluationEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="evaluationFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Travels">
        <h:form styleClass="association" id="travelsChildren">

            <h:outputText value="There are no travels associated with this user."
                       rendered="#{empty userHome.travels}"/>

            <rich:dataTable value="#{userHome.travels}"
                           var="_travel"
                      rendered="#{not empty userHome.travels}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="travelsTable">
                <rich:column sortBy="#{_travel.idTravel}">
                    <f:facet name="header">Id travel</f:facet>
                    <h:outputText value="#{_travel.idTravel}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_travel.name}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_travel.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_travel.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_travel.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_travel.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_travel.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.travelState}">
                    <f:facet name="header">Travel state</f:facet>
                    <h:outputText value="#{_travel.travelState}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.calculatedRate}">
                    <f:facet name="header">Calculated rate</f:facet>
                    <h:outputText value="#{_travel.calculatedRate}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_travel.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_travel.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_travel.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_travel.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_travel.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_travel.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_travel.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_travel.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_travel.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_travel.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_travel.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_travel.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_travel.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_travel.singleDay}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="travels">
        <div class="actionButtons">
            <s:button id="addtravel"
                   value="Add travel"
                    view="/TravelEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="travelFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Avatars">
        <h:form styleClass="association" id="avatarsChildren">

            <h:outputText value="There are no avatars associated with this user."
                       rendered="#{empty userHome.avatars}"/>

            <rich:dataTable value="#{userHome.avatars}"
                           var="_avatar"
                      rendered="#{not empty userHome.avatars}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="avatarsTable">
                <rich:column sortBy="#{_avatar.idAvatar}">
                    <f:facet name="header">Id avatar</f:facet>
                    <h:outputText value="#{_avatar.idAvatar}"/>
                </rich:column>
                <rich:column sortBy="#{_avatar.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_avatar.name}"/>
                </rich:column>
                <rich:column sortBy="#{_avatar.image}">
                    <f:facet name="header">Image</f:facet>
                    <h:outputText value="#{_avatar.image}"/>
                </rich:column>
                <rich:column sortBy="#{_avatar.format}">
                    <f:facet name="header">Format</f:facet>
                    <h:outputText value="#{_avatar.format}"/>
                </rich:column>
                <rich:column sortBy="#{_avatar.type}">
                    <f:facet name="header">Type</f:facet>
                    <h:outputText value="#{_avatar.type}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="avatars">
        <div class="actionButtons">
            <s:button id="addavatar"
                   value="Add avatar"
                    view="/AvatarEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="avatarFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Comments">
        <h:form styleClass="association" id="commentsChildren">

            <h:outputText value="There are no comments associated with this user."
                       rendered="#{empty userHome.comments}"/>

            <rich:dataTable value="#{userHome.comments}"
                           var="_comment"
                      rendered="#{not empty userHome.comments}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="commentsTable">
                <rich:column sortBy="#{_comment.idComment}">
                    <f:facet name="header">Id comment</f:facet>
                    <h:outputText value="#{_comment.idComment}"/>
                </rich:column>
                <rich:column sortBy="#{_comment.msg}">
                    <f:facet name="header">Msg</f:facet>
                    <h:outputText value="#{_comment.msg}"/>
                </rich:column>
                <rich:column sortBy="#{_comment.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_comment.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="comments">
        <div class="actionButtons">
            <s:button id="addcomment"
                   value="Add comment"
                    view="/CommentEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="commentFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Matchs">
        <h:form styleClass="association" id="matchsChildren">

            <h:outputText value="There are no matchs associated with this user."
                       rendered="#{empty userHome.matchs}"/>

            <rich:dataTable value="#{userHome.matchs}"
                           var="_match"
                      rendered="#{not empty userHome.matchs}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="matchsTable">
                <rich:column sortBy="#{_match.idMatch}">
                    <f:facet name="header">Id match</f:facet>
                    <h:outputText value="#{_match.idMatch}"/>
                </rich:column>
                <rich:column sortBy="#{_match.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_match.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_match.seenDate}">
                    <f:facet name="header">Seen date</f:facet>
                    <h:outputText value="#{_match.seenDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_match.rejectDate}">
                    <f:facet name="header">Reject date</f:facet>
                    <h:outputText value="#{_match.rejectDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{userHome.managed}" id="matchs">
        <div class="actionButtons">
            <s:button id="addmatch"
                   value="Add match"
                    view="/MatchEdit.xhtml"
             propagation="none">
                 <f:param name="userIdUser"
                         value="#{userHome.instance.idUser}"/>
                 <f:param name="matchFrom" value="User"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
